import React from 'react';
import { Collapse } from 'antd';
import { CollapseProps } from 'antd/lib/collapse';
import styles from './index.less';

const { Panel } = Collapse;

export interface CustomCollapseProps extends CollapseProps {
    children: any;
}

const CustomCollapse = ({ bordered, children, ...rest }: CustomCollapseProps) => (
    <Collapse className={styles.customCollapse} bordered={bordered} expandIconPosition="right" {...rest}>
        {children}
    </Collapse>
);

CustomCollapse.Panel = Panel;

export default CustomCollapse;
